from django.urls import path
from . import views

app_name = 'dashboard'

urlpatterns = [
    path('', views.admin_dashboard, name='admin_dashboard'),
    path('users/', views.user_management, name='user_management'),
    path('users/<int:user_id>/', views.user_detail, name='user_detail'),
    path('users/<int:user_id>/toggle-status/', views.toggle_user_status, name='toggle_user_status'),
    path('users/<int:user_id>/set-type/', views.set_user_type, name='set_user_type'),
    path('activities/', views.activity_management, name='activity_management'),

    # 删除活动
    
    # 系统分析和日志
    path('analytics/', views.system_analytics, name='system_analytics'),
    path('logs/', views.admin_logs, name='admin_logs'),
    path('stats/', views.get_dashboard_stats, name='get_dashboard_stats'),

    # 分类管理相关
    path('categories/', views.category_management, name='category_management'),
    path('categories/create/', views.category_create, name='category_create'),
    path('categories/<int:category_id>/edit/', views.category_edit, name='category_edit'),
    path('categories/<int:category_id>/delete/', views.category_delete, name='category_delete'),


    #系统通知，删除，拒绝同意
    path('activities/<int:activity_id>/approve/', views.approve_activity, name='approve_activity'),
    path('activities/<int:activity_id>/reject/', views.reject_activity, name='reject_activity'),
    path('activities/<int:activity_id>/delete/', views.activity_delete, name='activity_delete'),

    # 积分管理
    path('points/', views.points_management, name='points_management'),
    path('points/records/', views.points_records_management, name='points_records_management'),
    path('points/users/<int:user_id>/adjust/', views.manual_points_adjust, name='manual_points_adjust'),

    # 奖品管理
    path('rewards/', views.rewards_management, name='rewards_management'),
    path('rewards/create/', views.reward_create, name='reward_create'),
    path('rewards/<int:reward_id>/edit/', views.reward_edit, name='reward_edit'),
    path('rewards/<int:reward_id>/delete/', views.reward_delete, name='reward_delete'),

    # 兑换记录管理
    path('reward-exchanges/', views.reward_exchange_management, name='reward_exchange_management'),
    path('reward-exchanges/<int:exchange_id>/update-status/', views.update_exchange_status,
         name='update_exchange_status'),

]